package com.boss.salary.enums;
/**
 * <br>Title: 是否特殊岗位枚举类
 * <br>Description: 是否特殊岗位枚举类
 * <br>Author: 王再岐
 * <br>Date: 2020-11-19 11：30
 */
public enum YesOrNoEnum {

    /** 是 **/
    YES("1", "是"),
    /** 否 **/
    NO("0", "否");

    private String code;
    private String name;

    YesOrNoEnum(String code, String name) {
        this.code = code;
        this.name = name;
    }

    public static YesOrNoEnum valueOfCode(String code) {
        YesOrNoEnum[] var1 = values();
        int var2 = var1.length;

        for(int var3 = 0; var3 < var2; ++var3) {
            YesOrNoEnum typeEnum = var1[var3];
            if (typeEnum.getCode().equals(code)) {
                return typeEnum;
            }
        }
        return null;
    }

    public static String valueOfName(String name) {
        YesOrNoEnum[] var1 = values();
        int var2 = var1.length;

        for(int var3 = 0; var3 < var2; ++var3) {
            YesOrNoEnum typeEnum = var1[var3];
            if (typeEnum.getName().equals(name)) {
                return typeEnum.code;
            }
        }
        return null;
    }


    public String getCode() {
        return this.code;
    }

    public String getName() {
        return this.name;
    }
}
